package stockblaster.client;

import java.util.HashMap;

public class Users {
	//<UserName, object StockUser>
	public static HashMap<String, StockUser> users = 
			new HashMap<String, StockUser>();
	
	/*
	 * Adding a user into users:
	 * - use Users.users.put(username, new StockUser(username, password, fund))
	 * - where username and password are String
	 */
	
	/**
	 * Method to check whether user exists
	 * @param uName the username to be checked
	 * @return true if user exists; false otherwise
	 */
	public static boolean doesUserExist(String uName) {
		if (users.get(uName) != null) {
			return true;
		} else {
			return false;
		}
	}
}
